package com.itfs;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;

public class CollectionsDemo02 {
    public static void main(String[] args) {
        Collection<String> list = new ArrayList<>();
        Collections.addAll(list,"aaa","bbb","ccc","vvv","ddd");

        Iterator<String> iterator = list.iterator();
        boolean hasNext = iterator.hasNext();
        System.out.println("迭代器hasNext"+ hasNext);
        String next = iterator.next();
        System.out.println("迭代器Next"+next);

    }


}
